home *** CD-ROM | disk | FTP | other *** search
- /* ====================
- * PedViewScrollerTE.cc
- * ====================
- */
-
- #include "PedestalDebugging.h"
-
- #include "PedViewScrollerTE.hh"
- #include "PedPaneSubView.hh"
- #include "PedViewScroll.hh"
- #include "PedScrollbar.hh"
- #include "PedPaneTE.hh"
-
-
- PedViewScrollerTE::PedViewScrollerTE(PedPaneSubView &inSuperPane)
- : PedViewScroller(inSuperPane), mPane(NULL)
- {
- mPane = new PedPaneTE(*this);
- //mPane->Resize(mFrame.right - 15, mFrame.bottom - 15);
- }
-
- PedViewScrollerTE::~PedViewScrollerTE()
- {
- if (mPane) mPane->release();
- }
-
- void
- PedViewScrollerTE::Dispose()
- {
- PedViewScroller::Dispose();
- if (mPane) {
- mPane->Dispose();
- mPane->release();
- mPane = NULL;
- }
- }
-
-
- PedPane *
- PedViewScrollerTE::Pane()
- {
- return mPane;
- }
-
- PedPane *
- PedViewScrollerTE::MyPane()
- {
- return mPane;
- }
-
-
- void
- PedViewScrollerTE::SetPane(PedPaneTE *inPane)
- {
- PedPaneTE *oldPane = mPane;
- if (inPane) inPane->retain();
- mPane = inPane;
- if (oldPane) oldPane->release();
-
- mPane->Resize(mFrame.right - (mScrollV ? 15 : 0),
- mFrame.bottom - (mScrollH ? 15 : 0));
- Calibrate();
- }
-
-
- void
- PedViewScrollerTE::Scroll(short inH, short inV, bool inUpdate)
- {
- if (mPane) {
- mPane->Scroll(inH, inV, inUpdate);
- }
- Calibrate();
- }
-
-
- void
- PedViewScrollerTE::GetAperture(Rect &outAperture)
- {
- GetFrame(outAperture);
- if (mScrollV) {
- outAperture.right -= 15;
- }
- if (mScrollH) {
- outAperture.bottom -= 15;
- }
- }
-
- void
- PedViewScrollerTE::GetScrollPos(Point &outPos)
- {
- if (mPane) {
- mPane->GetScrollPos(outPos);
- } else {
- ::SetPt(&outPos, 0, 0);
- }
- }
-